<template>
  <div class="homepage">
    <!-- 顶部导航栏 -->
    <header class="header">
      <div class="container">
        <div class="logo">蔚蓝音乐艺术</div>
        <nav class="nav">
          <el-button type="success" link @click="toStudent">学员系统</el-button>
          <el-button v-if="!isPhone" type="primary" link @click="toAdmin">管理后台</el-button>
        </nav>
      </div>
    </header>

    <!-- Banner轮播图 - 使用Element Plus走马灯 -->
    <section class="banner">
      <el-carousel :interval="5000" arrow="always" :height="`${height}px`">
        <el-carousel-item v-for="(slide, index) in slides" :key="index">
          <div class="slide" @click="showDetail(slide)">
            <img :src="slide.avatar" :alt="slide.title">
          </div>
        </el-carousel-item>
      </el-carousel>
    </section>


    <!-- 课程分类 - 使用Element Plus Tabs -->
    <section id="instruments" class="instruments-section">
      <div class="container">
        <h2 class="section-title">课程分类</h2>
        <el-tabs type="border-card" class="instruments-tabs">
          <el-tab-pane v-for="(category, index) in instrumentCategories" :key="index" :label="category.icName">
            <div class="tab-content">
              <div v-html="category.description"></div>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </section>

    <!-- 教师团队 -->
    <section id="teachers" class="teachers-section">
      <div class="container">
        <h2 class="section-title">专业教师团队</h2>
        <div class="teachers-grid">
          <div class="teacher-card" v-for="(teacher, index) in teachers" :key="index">
            <img :src="teacher.avatar" :alt="teacher.instrumentNames">
            <div class="teacher-info">
              <h3>{{ teacher.teacherName }}</h3>
              <span>{{ teacher.instrumentNames }}</span>
              <p>{{ teacher.description }}</p>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- 教学环境 -->
    <section id="classrooms" class="classrooms-section">
      <div class="container">
        <h2 class="section-title">教室环境</h2>
        <div class="classrooms-grid">
          <div class="classroom-card" v-for="(classroom, index) in classrooms" :key="index">
            <div class="classroom-image">
              <img :src="classroom.avatar" :alt="classroom.classroomName">
            </div>
            <div class="classroom-name">{{ classroom.classroomName }}</div>
          </div>
        </div>
      </div>
    </section>

    <!-- 琴行活动 - 简化版 -->
    <section id="activities" class="activities-section">
      <div class="container">
        <h2 class="section-title">琴行活动</h2>
        <div class="activities-grid">
          <div class="activity-card" v-for="(activity, index) in activities" :key="index" @click="showDetail(activity)">
            <img class="activity-image" :src="activity.avatar" :alt="activity.title">
            <h3 class="activity-title">{{ activity.activityName }}</h3>
          </div>
        </div>

        <el-dialog :fullscreen="isPhone" v-model="detailDialogVisible" :title="currentDetail.title" width="60%">
          <div style="width: 100%;" v-html="currentDetail.description"></div>
        </el-dialog>
      </div>
    </section>

    <!-- 关于我们 -->
    <section id="about" class="about-section">
      <div class="container">
        <h2 class="section-title">关于我们</h2>
        
        <!-- 简介部分 - 文章形式 -->
        <div class="about-intro">
          <h3 class="intro-title">琴行简介</h3>
          <div class="intro-content">
            <p style="line-height: 2.5;">蔚蓝音乐创立于2015年，是北京领先的专业音乐教育机构。我们致力于为各年龄段学员提供高质量的音乐教育服务。学校拥有20多位专业教师团队，累计培养学员超过1000人。我们的教学理念是"因材施教，快乐学习"，让每位学员都能在音乐中找到属于自己的快乐。学校设施齐全，拥有专业琴房20间，多功能音乐厅1个，可满足不同课程的教学需求。我们提供钢琴、吉他、小提琴、声乐等多种课程，并定期举办音乐会和大师课。</p>
          </div>
        </div>

        <!-- 荣誉部分 - 图片加荣誉名称 -->
        <div class="about-honors">
          <h3 class="honors-title">荣誉奖项</h3>
          <div class="honors-grid">
            <div class="honor-item" v-for="(honor, index) in honors" :key="index">
              <img :src="honor.avatar" :alt="honor.honorName">
              <p>{{ honor.honorName }}</p>
            </div>
          </div>
        </div>

        <!-- 发展历程 - 时间线形式 -->
        <div class="about-timeline">
          <h3 class="timeline-title">发展历程</h3>
          <div class="timeline">
            <div class="timeline-item" v-for="(experience, index) in experiences">
              <div class="timeline-year">{{ experience.date }}</div>
              <div class="timeline-content">
                <h4>{{ experience.experienceName }}</h4>
                <p>{{ experience.content }}</p>
              </div>
            </div>
            
          </div>
        </div>
      </div>
    </section>

    <!-- 页脚 -->
    <footer class="footer">
      <div class="container">
        <div class="footer-content">
          <div class="footer-contact">
            <h3 class="footer-title">联系我们</h3>
            <div class="contact-info">
              <p><i class="el-icon-phone"></i> 电话: 133-4118-3738</p>
              <p><i class="el-icon-message"></i> 邮箱: 13341183738@126.com</p>
              <p><i class="el-icon-location"></i> 地址: 银河系地球村蔚蓝音乐</p>
            </div>
          </div>
          <div class="footer-form">
            <h3 class="footer-title">留下您的信息</h3>
            <el-form :model="form" :rules="rules" ref="contactForm" @submit.prevent="submitForm">
              <el-form-item prop="name">
                <el-input v-model="form.name" placeholder="您的姓名"></el-input>
              </el-form-item>
              <el-form-item prop="phone">
                <el-input v-model="form.phone" placeholder="您的电话"></el-input>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" native-type="submit">提交信息</el-button>
              </el-form-item>
            </el-form>
          </div>
          <div class="copyright">
            <p>&copy; 2025 蔚蓝音乐艺术 版权所有</p>
          </div>
        </div>
      </div>
    </footer>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { ElCarousel, ElCarouselItem, ElDialog } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
const router = useRouter()
import { getBannerList, getActivityWebList, getTeacherList, getInstrumentList, getExperienceList, getHonorList, webInsertStudent, getClassroomList } from '@/api/web'
const isPhone = ref(false)
// 详情弹窗相关
const detailDialogVisible = ref(false)
const height = window.innerWidth / 21 * 9
const currentDetail = ref({
  title: '',
  description: ''
})

// 显示详情
const showDetail = (item) => {
  currentDetail.value = {
    title: item.title || item.activityName,
    description: item.description
  }
  detailDialogVisible.value = true
}
// Banner轮播图数据
const slides = ref([])

// 教师团队数据
const teachers = ref([])

// 课程分类数据
const instrumentCategories = ref([])

// 琴行活动数据
const activities = ref([])

// 荣誉列表
const honors = ref([])

// 经历
const experiences = ref([])
// 教室列表
const classrooms = ref([])

// 表单数据
const form = ref({
  name: '',
  phone: ''
})

// 表单验证规则
const rules = {
  name: [
    { required: true, message: '请输入您的姓名', trigger: 'blur' },
    { min: 2, max: 10, message: '长度在2到10个字符', trigger: 'blur' }
  ],
  phone: [
    { required: true, message: '请输入联系电话', trigger: 'blur' },
    { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
  ]
}
const contactForm = ref(null)
// 提交表单
const submitForm = () => {
  
  contactForm.value.validate((valid) => {
    if (valid) {
      webInsertStudent({
        studentName: form.value.name,
        phone: form.value.phone
      }).then(() => {
        ElMessage.success('提交成功!')
      })
      // 重置表单
      form.value = {
        name: '',
        phone: ''      
      }
    } else {
      ElMessage.error('请检查表单填写是否正确')
      return false
    }
  })
}


const toAdmin = () => {
  router.push('/course')
}

const toStudent = () => {
  router.push('/studentSystem')
}


getBannerList().then(res => {
    slides.value = res.data
  })
  getActivityWebList().then(res => {
    activities.value = res.data
  })
  getTeacherList().then(res => {
    teachers.value = res.data
  })
  getInstrumentList().then(res => {
    instrumentCategories.value = res.data
  })
  getHonorList().then(res => {
    honors.value = res.data
  })
  getExperienceList().then(res => {
    experiences.value = res.data
  })
  getClassroomList().then(res => {
    classrooms.value = res.data
  })
onMounted(() => {
  isPhone.value = /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
})
</script>

<style scoped>
.homepage {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #333;
  scroll-behavior: smooth;
}



/* 修复锚点跳转被header遮挡的问题 */
section[id] {
  scroll-margin-top: 70px;
  padding-top: 20px;
}

@keyframes fadeIn {
  from { opacity: 1; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 600;
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  margin-bottom: 50px;
  animation: fadeIn 0.8s ease-out;
}

/* 头部样式 */
.header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #4e73df;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav a:hover {
  color: #4e73df;
}

.admin-btn {
  background-color: #4e73df;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.admin-btn:hover {
  background-color: #3a56c7;
}

/* Banner轮播图样式 */
.banner {
  position: relative;
  overflow: hidden;
}

.banner-slider {
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.slide-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.slide-content p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.cta-button {
  background-color: #ff6b6b;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
}

.cta-button:hover {
  background-color: #e63946;
  transform: translateY(-3px);
}

/* 各部分通用样式 */
section {
  padding-top: 70px;
  /* padding: 70px 0; */
  padding-top: 70px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #4e73df;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #1cc88a;
}

/* 教师团队样式 */
.teachers-section {
  background-color: #f8f9fc;
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

@media (max-width: 768px) {
  .teachers-grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .teacher-card {
    flex-shrink: 0;
    width: 60vw;
  }

  /* 移动端禁用所有动画效果 */
  .teacher-card,
  .teacher-card img,
  .classroom-card,
  .activity-card,
  .honor-item,
  .timeline-year,
  .contact-info p {
    transition: none;
  }

  .teacher-card:hover,
  .classroom-card:hover,
  .activity-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }

  .honor-item:hover img {
    transform: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  }

  .timeline-item:hover .timeline-year {
    transform: none;
  }

  .contact-info p:hover {
    transform: none;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .teachers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .teachers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.teacher-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.teacher-card:hover {
  transform: translateY(-10px);
}

.teacher-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: 
    linear-gradient(135deg, rgba(78,115,223,0.1) 0%, rgba(28,200,138,0.1) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.1),
      rgba(255,255,255,0.1) 1px,
      transparent 1px,
      transparent 6px
    );
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.teacher-info {
  padding: 20px;
  text-align: center;
}

.teacher-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #4e73df;
}

.teacher-info p {
  color: #666;
  margin-top: 10px;
  line-height: 1.6;
}

.teacher-info span {
  display: inline-block;
  background-color: #f8f9fc;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* 课程分类样式 - 优化版 */
.instruments-section {
  background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
  padding: 80px 0;
  position: relative;
}

.instruments-tabs {
  margin-top: 30px;
  box-shadow: 0 10px 30px rgba(78, 115, 223, 0.15);
  border-radius: 16px;
  overflow: hidden;
  will-change: transform;
}

.instruments-tabs :deep(.el-tabs__header) {
  background: linear-gradient(to right, #4e73df, #1cc88a);
  border-radius: 16px 16px 0 0;
  padding: 0 20px;
}

.instruments-tabs :deep(.el-tabs__nav) {
  border: none !important;
}

.instruments-tabs :deep(.el-tabs__item) {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  height: 60px;
  line-height: 60px;
  padding: 0 20px;
  transition: color 0.2s ease;
}

.instruments-tabs :deep(.el-tabs__nav-wrap.is-scrollable){
  display: flex;
  justify-content: center;
  align-items: center;
}
.instruments-tabs :deep(.el-tabs__nav-prev),
.instruments-tabs :deep(.el-tabs__nav-next) {
  color: white; /* Make arrows white */
}

.instruments-tabs :deep(.el-tabs__item.is-active) {
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
  position: relative;
  border: none;
}

.instruments-tabs :deep(.el-tabs__active-bar) {
  height: 4px;
  background: linear-gradient(90deg, #4e73df, #1cc88a);
  border-radius: 4px 4px 0 0;
}

.tab-content {
  min-height: 300px;
  background-color: white;
  border-radius: 0 0 16px 16px;
  position: relative;
}

.tab-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  /* background: linear-gradient(to right, #4e73df, #1cc88a); */
}

.instrument-content {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease-out;
  will-change: opacity, transform;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.instrument-content h3 {
  font-size: 1.8rem;
  color: #4e73df;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.instrument-content h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, #4e73df, #1cc88a);
}

.instrument-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 20px;
}

.instrument-content ul {
  padding-left: 25px;
  margin-bottom: 30px;
}

.instrument-content ul li {
  font-size: 1.1rem;
  margin-bottom: 12px;
  position: relative;
  color: #555;
}

.instrument-content ul li::before {
  content: '•';
  color: #4e73df;
  font-weight: bold;
  position: absolute;
  left: -18px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  background: rgba(78, 115, 223, 0.05);
  transition: transform 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
}

.feature-item i {
  font-size: 1.5rem;
  color: #4e73df;
  margin-right: 15px;
}

.feature-item span {
  font-weight: 600;
  color: #333;
}

/* 琴行活动样式 - 简化版 */
.activities-section {
  background-color: #f8f9fc;
  padding: 60px 0;
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.activity-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.activity-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.activity-title {
  font-size: 1.2rem;
  padding: 15px;
  color: #4e73df;
  margin: 0;
}

/* 教学环境样式 */
.classrooms-section {
  background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
  padding: 80px 0;
}

.classrooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.classroom-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.classroom-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(78, 115, 223, 0.15);
}

.classroom-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.classroom-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 改为contain以显示完整图片 */
  background: #dadde6; /* 添加背景色 */
  
  transition: transform 0.3s ease;
}

.classroom-name {
  padding: 15px;
  text-align: center;
  color: #4e73df;
  font-size: 1.2rem;
  font-weight: 500;
  border-top: 1px solid #eee;
}

@media (max-width: 1200px) {
  .classrooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .classrooms-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .classroom-image {
    height: 250px;
  }
  
  .classroom-name {
    font-size: 1.1rem;
    padding: 12px;
  }
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .activities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .activities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .activities-grid {
    grid-template-columns: 1fr;
  }

  .header .container {
    padding: 10px 15px;
  }

  .logo {
    font-size: 20px;
  }

  .nav {
    gap: 15px;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  section {
    /* padding: 40px 0; */
    padding-top: 40px;
    /* padding: 40px 0; */
    padding-top: 40px;
  }

  .teacher-card img {
    height: 250px;
  }

  .teacher-info h3 {
    font-size: 1.2rem;
  }

  .instruments-tabs :deep(.el-tabs__item) {
    font-size: 0.9rem;
    height: 50px;
    line-height: 50px;
    padding: 0 15px;
  }

  .tab-content {
    min-height: 200px;
  }

  .instrument-content h3 {
    font-size: 1.5rem;
  }

  .instrument-content p,
  .instrument-content ul li {
    font-size: 1rem;
  }

  .activity-image {
    height: 150px;
  }

  .activity-title {
    font-size: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-contact,
  .footer-form {
    text-align: center;
  }

  .contact-info p {
    justify-content: center;
  }

  .about-intro {
    padding: 30px;
  }

  .intro-title,
  .honors-title,
  .timeline-title {
    font-size: 1.5rem;
  }

  .honors-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 15px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item::before {
    left: 10px;
  }

  .timeline-year {
    left: 18px;
    transform: translateX(-50%);
  }
}

/* 页脚样式 */
.footer {
  background-color: #f8f9fc;
  padding: 40px 0 20px;
  border-top: 1px solid #eaeaea;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
  }
}

rs {
  background-color: white;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 50px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.honors-title {
  color: #4e73df;
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.honors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  justify-content: center;
}

.honors-grid :only-child {
  max-width: 400px;
}

.honor-item {
  perspective: 1000px;
  animation: fadeIn 0.8s ease-out;
}

.honor-item img {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.honor-item:hover img {
  transform: scale(1.05) rotateY(10deg);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.honor-item {
  text-align: center;
}

.honor-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.honor-item p {
  font-weight: 500;
  color: #333;
}

.honor-item {
  perspective: 1000px;
  animation: fadeIn 0.8s ease-out;
}

.honor-item img {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.honor-item:hover img {
  transform: scale(1.05) rotateY(10deg);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.honor-item {
  text-align: center;
}

.honor-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 15px;
}

.honor-item p {
  font-weight: 500;
  color: #333;
}

/* 时间线部分 */
.about-timeline {
  background-color: white;
  border-radius: 12px;
  /* padding: 40px; */
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.timeline-title {
  color: #4e73df;
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 4px;
  background: linear-gradient(to bottom, #4e73df, #1cc88a);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  box-shadow: 0 0 10px rgba(78, 115, 223, 0.5);
}

.timeline-item {
  animation: fadeIn 0.8s ease-out;
}

.timeline-year {
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  box-shadow: 0 4px 15px rgba(78, 115, 223, 0.3);
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-year {
  transform: scale(1.1);
}

.timeline-item {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-year {
  background-color: #4e73df;
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  display: inline-block;
}

.timeline-content {
  padding: 20px;
  background-color: #f8f9fc;
  border-radius: 8px;
  position: relative;
}

.timeline-content::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #4e73df;
  border-radius: 50%;
  top: 30px;
}

.timeline-item:nth-child(odd) .timeline-content::after {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-content::after {
  left: -10px;
}

.timeline-content h4 {
  color: #4e73df;
  margin-bottom: 10px;
}

.timeline-content p {
  color: #666;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeline::before {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -10px;
  }
}

/* 页脚样式 */
.footer {
  background-color: #2c3e50;
  color: white;
  padding: 30px 0;
}

.copyright {
  text-align: center;
  color: #bdc3c7;
  font-size: 0.9rem;
}
</style>
